﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[System.Serializable]
public class SingleCameraMove
{
    /// <summary>
    /// 要表示不移动，Destination应为IDLE，相应的字符串为空
    /// </summary>
    public static Vector2 IDLE = Vector2.zero;

    [SerializeField]
    private float _Duration;
    /// <summary>
    /// 移动持续时间
    /// </summary>
    public float Duration => _Duration;
    [SerializeField]
    private Vector2 _Destination;
    /// <summary>
    /// 目的地
    /// </summary>
    public Vector2 Destination => _Destination;
    public SingleCameraMove(float destination, Vector2 offset)
    {
        _Duration = destination;
        _Destination = offset;
    }

    public static CameraMove operator +(SingleCameraMove s1, SingleCameraMove s2)
    {
        CameraMove c = new CameraMove();
        c.singleCameraMoves.Add(s1);
        if (s2 != null)
            c.singleCameraMoves.Add(s2);
        return c;
    }

}
